import request from '@/config/axios'

export interface TaskCalleeListNumberRuleVO {
  id: number
  extendCode: string
  extendName: string
  sort: number
}

// 查询呼叫名单号码额外参数规则列表
export const getTaskCalleeListNumberRulePage = async (params) => {
  return await request.get({url: `/call/task-callee-list-number-rule/page`, params})
}

// 查询呼叫名单号码额外参数规则详情
export const getTaskCalleeListNumberRule = async (id: number) => {
  return await request.get({url: `/call/task-callee-list-number-rule/get?id=` + id})
}

// 新增呼叫名单号码额外参数规则
export const createTaskCalleeListNumberRule = async (data: TaskCalleeListNumberRuleVO) => {
  return await request.post({url: `/call/task-callee-list-number-rule/create`, data})
}

// 修改呼叫名单号码额外参数规则
export const updateTaskCalleeListNumberRule = async (data: TaskCalleeListNumberRuleVO) => {
  return await request.put({url: `/call/task-callee-list-number-rule/update`, data})
}

// 删除呼叫名单号码额外参数规则
export const deleteTaskCalleeListNumberRule = async (id: number) => {
  return await request.delete({url: `/call/task-callee-list-number-rule/delete?id=` + id})
}

// 导出呼叫名单号码额外参数规则 Excel
export const exportTaskCalleeListNumberRule = async (params) => {
  return await request.download({url: `/call/task-callee-list-number-rule/export-excel`, params})
}
